package com.lmf.cloud.controller.feign;

import com.lmf.cloud.controller.fallback.SeataAccountFeignFallback;
import com.lmf.cloud.resp.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description TODO
 * <p>
 * Copyright @2022 Shanghai Mise Co. Ltd.
 * All right reserved.
 * <p>
 * @Author LiuMingFu
 * @Date 2024/8/1 19:36
 */
@FeignClient(value = "cloud-nacos-seata-account-9008", path = "/t-account", fallback = SeataAccountFeignFallback.class)
public interface SeataAccountFeign {
    /**
     * 扣减账户余额
     *
     * @param userId 用户id
     * @param count  扣减金额
     * @return
     */
    @RequestMapping("/decreaseAccount")
    ResultData<Boolean> decreaseAccount(@RequestParam("userId") Long userId, @RequestParam("count") Integer count);
}
